Imports System.Text.RegularExpressions

Public Class SharePointUri

    Private _uriPath As Uri
    Private _sitePath As Uri

    Public Sub New(ByVal fullUriPath As Uri, ByVal fullSiteUriPath As Uri)
        _uriPath = New Uri(Regex.Replace(fullUriPath.ToString(), "^[ /]+|[ /]+$", String.Empty))
        _sitePath = New Uri(Regex.Replace(fullSiteUriPath.ToString(), "^[ /]+|[ /]+$", String.Empty))
    End Sub

    Public ReadOnly Property SitePath() As Uri
        Get
            Return _sitePath
        End Get
    End Property

    Public ReadOnly Property FullPath() As Uri
        Get
            Return _uriPath
        End Get
    End Property
End Class
